import { createRouter, createWebHistory } from 'vue-router';
import Home from '@/pages/Home.vue';
import RestaurantDetail from '@/RestaurantDetail.vue';
import UserInfo from '@/UserInfo.vue';

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/restaurant/:id',
        name: 'RestaurantDetail',
        component: RestaurantDetail,
        props: true
    },
    {
        path: '/user',
        name: 'UserInfo',
        component: UserInfo
    }
];

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
});

export default router;